Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix conversion from sparse matrix to dense array when nb == 0 and not low_rank_background #1387

Merged
merged 3 commits into from
Sep 3, 2024

Conversation

ethanbb
Copy link
Contributor

@ethanbb ethanbb commented Aug 11, 2024

Description

Fixes a spot in the code where a sparse matrix was being passed into np.array, which is not allowed and throws an error. This block of code seems to execute when low_rank_background is False and nb is not set to 0.

Partially addresses #1185, nel-lab/mesmerize-core#231.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Has your PR been tested?

I made some changes to test_toydata.py so that it can more easily test multiple different sets of parameters, and then I added a couple of sets for batch processing. I confirmed that without this fix, the one called 'patch-not-lowrank' reproduces this error, and with it the tests pass.

@ethanbb
Copy link
Contributor Author

ethanbb commented Sep 3, 2024

Bumping @pgunn, related to a CI error in mesmerize (and this is a bug that people might run into).

I realize this mostly became a change to test_toydata, which I hope was an improvement, but I'm definitely open to doing that differently.

@pgunn pgunn merged commit f042ca0 into flatironinstitute:dev Sep 3, 2024
3 checks passed
@ethanbb ethanbb deleted the lowrank-false-sparse-fix branch September 4, 2024 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants